
:root {
  --fab-width: 56px;
  --fab-height: 56px;
  --fab-position: absolute;
  --fab-mini-width: 40px;
  --fab-mini-height: 40px;

  --material-fab-width: 56px;
  --material-fab-height: 56px;
  --material-fab-position: absolute;
  --material-fab-mini-width: 40px;
  --material-fab-mini-height: 40px;

  @define-mixin fab {
    position: relative;
    display: inline-block;
    @mixin reset-box-model;
    @mixin reset-base;
    @mixin reset-font;
    @mixin reset-cursor;
    width: var(--fab-width);
    height: var(--fab-height);
    text-decoration: none;
    font-size: 25px;
    line-height: var(--fab-height);
    letter-spacing: 0;
    color: var(--fab-text-color);
    vertical-align: middle;
    text-align: center;
    background-color: var(--fab-background-color);
    border: 0 solid currentColor;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
    transition: all 0.1s linear;
  }

  @define-mixin material-fab {
    @mixin fab;
    @mixin material-font;
    width: var(--material-fab-width);
    height: var(--material-fab-height);
    text-decoration: none;
    font-size: 25px;
    line-height: var(--material-fab-height);
    color: var(--material-fab-text-color);
    background-color: var(--material-fab-background-color);
    @mixin material-shadow-2;
    transition: all 0.2s ease-in-out;
  }

  @define-mixin fab--focus {
    outline: 0;
  }

  @define-mixin material-fab--focus {
    outline: 0;
  }

  @define-mixin fab--active {
    box-shadow: 0 3px 6 rgba(0, 0, 0, 0.12);
    background-color: var(--fab-active-background-color);
    transition: all 0.2s ease;
  }

  @define-mixin material-fab--active {
    @mixin material-shadow-4;
    background-color: var(--material-fab-active-background-color);
    transition: all 0.2s ease;
  }

  @define-mixin fab--disabled {
    background-color: color-mod(black alpha(50%));
    @mixin material-shadow-0;
    @mixin disabled;
  }

  @define-mixin material-fab--disabled {
    background-color: color-mod(black alpha(50%));
    @mixin material-shadow-0;
    @mixin disabled;
  }
}

/*~
  name: Fab
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab"><i class="zmdi zmdi-car"></i></button>
    <button class="fab" disabled><i class="zmdi zmdi-car"></i></button>
*/
/* stylelint-disable */
ons-fab, ons-speed-dial-item, button {
  &.fab {
    @mixin fab;
    &:active {
      @mixin fab--active;
      box-shadow: 0 0 6 rgba(0, 0, 0, 0.12);
    }
    &:focus {
      @mixin fab--focus;
    }
    &:disabled,
    &[disabled] {
      @mixin material-fab--disabled;
    }
  }

  &.fab__icon {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: block;
    border-radius: 100%;
    padding: 0;
    z-index: 100;
    line-height: var(--material-fab-height);
  }
}
/* stylelint-enable */

/*~
  name: Material Fab
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab fab--material"><i class="zmdi zmdi-car"></i></button>
    <button class="fab fab--material" disabled><i class="zmdi zmdi-car"></i></button>
*/

/* stylelint-disable */
ons-fab, ons-speed-dial-item, button {
  &.fab--material {
    @mixin material-fab;
  }

  &.fab--material:active {
    @mixin material-fab--active;
  }

  &.fab--material:focus {
    @mixin material-fab--focus;
  }

  &.fab--material__icon {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: block;
    border-radius: 100%;
    padding: 0;
    z-index: 100;
    line-height: var(--material-fab-height);
  }

  &.fab--material:disabled,
  &.fab--material[disabled] {
    @mixin material-fab--disabled;
  }
}
/* stylelint-enable */

/*~
  name: Fab Mini
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab fab--mini"><i class="zmdi zmdi-plus"></i></button>
    <button class="fab fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
*/

/*~
  name: Material Fab Mini
  category: Fab
  elements: ons-fab
  markup: |
    <button class="fab fab--material fab--mini"><i class="zmdi zmdi-plus"></i></button>
    <button class="fab fab--material fab--mini" disabled><i class="zmdi zmdi-plus"></i></button>
*/

/* stylelint-disable */
ons-fab, ons-speed-dial-item, button {
  &.fab--mini {
    width: var(--fab-mini-width);
    height: var(--fab-mini-height);
    line-height: var(--fab-mini-height);
  }

  &.fab--mini__icon {
    line-height: var(--fab-mini-height);
  }

  &.speed-dial__item  {
    position: absolute;
    transform: scale(0);
  }
}
/* stylelint-enable */

/* stylelint-disable */
ons-fab, button, .speed-dial {
  &.fab--top__right {
    top: 20px;
    bottom: auto;
    right: 20px;
    left: auto;
    position: var(--fab-position);
  }

  &.fab--bottom__right {
    top: auto;
    bottom: 20px;
    right: 20px;
    left: auto;
    position: var(--fab-position);
  }

  &.fab--top__left {
    top: 20px;
    bottom: auto;
    right: auto;
    left: 20px;
    position: var(--fab-position);
  }

  &.fab--bottom__left {
    top: auto;
    bottom: 20px;
    right: auto;
    left: 20px;
    position: var(--fab-position);
  }

  &.fab--top__center {
    top: 20px;
    bottom: auto;
    margin-left: -28px;
    left: 50%;
    right: auto;
    position: var(--fab-position);
  }

  &.fab--bottom__center {
    top: auto;
    bottom: 20px;
    margin-left: -28px;
    left: 50%;
    right: auto;
    position: var(--fab-position);
  }
}
/* stylelint-enable */
